﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="management.aspx.cs" Inherits="TimeIt.beispiele.management" %>

<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Login-Site</title>
    <link rel="stylesheet" type="text/css" href="../style/scripte/spacss.css" />
    <link rel="stylesheet" type="text/css" href="../style/scripte/menu1css.css" />
    <link rel="stylesheet" type="text/css" href="../style/scripte/content.css" />
    <link rel="shortcut icon" href="../style/pictures/logo/iconlogo.png" /> 
    <style type="text/css">
        .style2
        {
            width: 288px;
        }
        .style6
        {
            text-decoration: underline;
        }
        .style8
        {
            width: 100%;
        }
        .style9
        {
            width: 205px;
        }
        .style10
        {
            width: 195px;
        }
        .style15
        {
            height: 30px;
            text-align: left;
            width: 128px;
        }
        .style14
        {
            height: 30px;
            text-align: left;
            width: 193px;
        }
        .style22
        {
            text-align: left;
            width: 128px;
        }
        .style26
        {
            text-align: left;
            width: 193px;
        }
        .style23
        {
            width: 128px;
        }
        .style27
        {
            width: 193px;
        }
        .style16
        {
            text-align: left;
            width: 171px;
        }
        </style>
</head>
<body>
    <div id="backgroundbody">
        <div id="templatecontent">
            <div id="content_top">
                <div id="menu_o_bg">
                </div>
                <div id="menu_u_bg">
                </div>
                <div id="content_body">
                    <div id="content_bottom">
                    </div>
                </div>
            </div>
            <div id="content_border">
                <div id="menu_o">
                    <!-- Menu_1 Roll_over and drop_down -->
                    <ul id="Navigation">
                        <li><a href=""> </a></li>
                        <li><a href=""> </a></li>
                        <li><a href="login.aspx">Logout</a></li>
                        <li><a href="help.aspx">Help</a></li>
                        <li><a href="impressum.aspx">Impressum</a></li>
                    </ul>
                    <!-- Menu_1 Ende!! -->
                </div>
 
<!-- Contentbereich!! -->

        <div id="hellocontent">
            <p style="font-weight: 700; font-size: large">Welcome, 
                &nbsp;<asp:Label ID="UserName" runat="server" Text="User"></asp:Label>
                !</p>
        </div>
            <div id="editcontentadd">
                <p class="style2">
                    Current amount of employees:
        <asp:Label ID="lblCount2" runat="server" Text="..." ForeColor="#009933"></asp:Label>
    </p>

            </div>

           <div id="editcontent">

                <form id="form1" runat="server">
                <div id="management"></div>
                <br />
                <asp:Menu ID="manageMenu" runat="server" Orientation="Horizontal" onmenuitemclick="manageMenu_MenuItemClick" 
                    style="left:200px;height:40px;top:20px;width:800px">
                        <Items>
                            <asp:MenuItem Text=" " Value="first" 
                                ImageUrl="~/style/pictures/navigation/Menu_btn/statistics-analysis_btn.png"></asp:MenuItem>
                            <asp:MenuItem Text=" " Value="second" 
                                ImageUrl="~/style/pictures/navigation/Menu_btn/ProjectControl_btn.png"></asp:MenuItem>
                            <asp:MenuItem Text=" " Value="third" 
                                ImageUrl="~/style/pictures/navigation/Menu_btn/projectleaderControl_btn.png"></asp:MenuItem>
                            <asp:MenuItem Text=" " Value="fourth" 
                                ImageUrl="~/style/pictures/navigation/Menu_btn/controllingEmployees_btn.png"></asp:MenuItem>
                        </Items>
                        <StaticHoverStyle Font-Bold="True" Font-Underline="False" />
                        <StaticMenuItemStyle HorizontalPadding="10px" />
                        <StaticSelectedStyle HorizontalPadding="10px" />
                    </asp:Menu>
                    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                        <asp:View ID="StatisticsView" runat="server">

                        <span class="style6"><strong>Project-related margins:
                </strong></span>
                <br />

                <asp:ObjectDataSource ID="odsProject2" runat="server" SelectMethod="getAllDb"
                    TypeName="bll.clsProjectCollection"></asp:ObjectDataSource>
                <asp:Chart ID="Chart1" runat="server" BackImageWrapMode="Scaled" 
                    DataSourceID="odsProject2" Height="199px" 
                    Width="848px" AntiAliasing="Graphics" BackColor="Transparent">
                    <series>
                        <asp:Series ChartType="Spline" Name="Series1" XValueMember="Name" 
                            YValueMembers="Db" YValuesPerPoint="2">
                        </asp:Series>
                    </series>
                    <chartareas>
                        <asp:ChartArea Name="ChartArea1" BackColor="White">
                            <AxisY Title="Profit margin">
                            </AxisY>
                            <AxisX Title="Projects">
                            </AxisX>
                            <Area3DStyle Enable3D="True" Inclination="25" LightStyle="Realistic" 
                                Rotation="10" WallWidth="8" />
                        </asp:ChartArea>
                    </chartareas>
                </asp:Chart>

                        </asp:View>
                        <asp:View ID="ProjectView" runat="server">
                        <br />
                            <asp:Label ID="checkPMsg" runat="server" style="text-align: center"></asp:Label>

                        
                <p class="style6"><strong>Project Overview:</strong></p>
                <asp:ObjectDataSource ID="odsProject" runat="server" SelectMethod="getAllProjectsForManagement"
                    TypeName="bll.clsProjectCollection" DataObjectTypeName="bll.clsProject" InsertMethod="InsertProject" 
                    UpdateMethod="UpdateProject"></asp:ObjectDataSource>

                <asp:GridView ID="grdProject" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    DataSourceID="odsProject" ForeColor="Black" GridLines="Horizontal"
                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" 
                    BorderWidth="1px" Width="796px" PageSize="4" AllowPaging="True">
                    <Columns>
                        <asp:BoundField DataField="Name" HeaderText="Name" 
                            SortExpression="Name" />
                        <asp:BoundField DataField="Client" HeaderText="Client" 
                            SortExpression="Client" />
                        <asp:BoundField DataField="ContractPrice" HeaderText="Costs in €" 
                            SortExpression="ContractPrice" />
                        <asp:CheckBoxField DataField="Active" HeaderText="Active" 
                            SortExpression="Active" />
                        <asp:BoundField DataField="ContactPerson" HeaderText="Contact person" 
                            SortExpression="ContactPerson" />
                        <asp:BoundField DataField="TelNr" HeaderText="Tel.-Nr." 
                            SortExpression="TelNr" />
                        <asp:CommandField AccessibleHeaderText="Edit table" 
                            HeaderText="Edit table" ShowEditButton="True" CancelText="cancel" 
                            DeleteText="delete" EditText="edit" InsertText="insert" NewText="new" 
                            SelectText="select" UpdateText="update" />
                    </Columns>
                </asp:GridView>
                
                <p class="style6"><strong>Adding new project:</strong></p>

                            <table class="style8">
                                <tr>
                                    <td class="style10">
                                        Project name:&nbsp;&nbsp;</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPName" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorPName" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Client:&nbsp;&nbsp;</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPClient" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorClient" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Costs:&nbsp;&nbsp;</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPPreis" runat="server" style="margin-left: 1px"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorCosts" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Hourly rate (ext.):</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPHourlyrate" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorHourlyRate" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Active:&nbsp;&nbsp;</td>
                                    <td class="style9">
                                        <asp:CheckBox ID="check_active" runat="server" />
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Address:</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPAddress" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorAddress" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Postcode:&nbsp;&nbsp;</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPPostCode" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorPostCode" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Location:&nbsp;&nbsp;</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPLocation" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorLocation" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Country:</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPCountry" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorCountry" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Phone number:&nbsp;&nbsp;</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPTelNr" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorPhoneNr" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Title of contact:</td>
                                    <td class="style9">
                                        <asp:DropDownList ID="DropDownTitle" runat="server" Height="24px" Width="100%">
                                            <asp:ListItem>Ms.</asp:ListItem>
                                            <asp:ListItem>Mr.</asp:ListItem>
                                            <asp:ListItem>Dr.</asp:ListItem>
                                            <asp:ListItem>Prof. Dr.</asp:ListItem>
                                            <asp:ListItem>Dipl. Ing.</asp:ListItem>
                                            <asp:ListItem>Captain</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Contact person:</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPContactPerson" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorContact" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        Email:</td>
                                    <td class="style9">
                                        <asp:TextBox ID="txtPEmail" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="errorEmail" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        &nbsp;</td>
                                    <td class="style9">
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td class="style10">
                                        <asp:Button ID="insert_btn" runat="server" onclick="insert_btn_click" 
                                            Text="Submit Project" 
                                            ToolTip="Click here to insert all data of the new Project into the Database" 
                                            Width="131px" />
                                    </td>
                                    <td class="style9">
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                            </table>
                            <br />
                                <br />

                        </asp:View>
                        <asp:View ID="PLView" runat="server">
                            <br />
                            <span class="style6"><strong>Projectleader Overview:
                            <br />
                            <br />
                            <asp:ObjectDataSource ID="odsPL" runat="server" SelectMethod="GetUserByPosition" 
                                TypeName="bll.clsUserCollection">
                                <SelectParameters>
                                    <asp:Parameter Name="_position" Type="String"  DefaultValue="Projectleader" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                            <asp:GridView ID="grdPL" runat="server" 
                                AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
                                BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="odsPL" 
                                ForeColor="Black" GridLines="Horizontal" PageSize="4" Width="796px">
                                <Columns>
                                    <asp:DynamicField DataField="Title" HeaderText="Title" />
                                    <asp:DynamicField DataField="Name" HeaderText="Name" />
                                    <asp:DynamicField DataField="InternalHourlyRate" HeaderText="InternalHourlyRate" />
                                    <asp:DynamicField DataField="Email" HeaderText="Email" />
                                </Columns>
                            </asp:GridView>
                            <br />
                            <br />
                            <br />
                            Add new Projectleader:
                            <br />
                            <br />
                            <table style="width:100%;">
                                <tr>
                                    <td class="style15">
                                        Title:&nbsp;
                                    </td>
                                    <td class="style14">
                                        <asp:DropDownList ID="DropTitle" runat="server" Height="28px" Width="175px">
                                            <asp:ListItem>Ms.</asp:ListItem>
                                            <asp:ListItem>Mr.</asp:ListItem>
                                            <asp:ListItem>Dr.</asp:ListItem>
                                            <asp:ListItem>Prof. Dr.</asp:ListItem>
                                            <asp:ListItem>Dipl. Ing.</asp:ListItem>
                                            <asp:ListItem>Captain</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style22">
                                        Name:</td>
                                    <td class="style26">
                                        <asp:TextBox ID="txtUName" runat="server" Width="173px"></asp:TextBox>
                                    </td>
                                    <td style="text-align: left">
                                        <asp:Label ID="errorMsgName" runat="server" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style23">
                                        Email:</td>
                                    <td class="style27">
                                        <asp:TextBox ID="txtUEmail" runat="server" Width="173px"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:Label ID="errorMsgEmail" runat="server" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style23">
                                        Hourly rate (int.):</td>
                                    <td class="style27">
                                        <asp:TextBox ID="txtUHourlyrate" runat="server" Width="173px"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:Label ID="errorMsgHourlyRate" runat="server" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style23">
                                        Login password:</td>
                                    <td class="style27">
                                        <asp:TextBox ID="txtUPw" runat="server" TextMode="Password" Width="173px"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:Label ID="ErrorMsgPW" runat="server" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style23">
                                    </td>
                                    <td class="style27">
                                        <asp:Button ID="btninsert_projectleader" runat="server" 
                                            onclick="btninsert_projectleader" style="text-align: left" 
                                            Text="Add Projectleader..." Width="175px" />
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style16" colspan="3">
                                        &nbsp;</td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            </strong></span>
                        <br />
                        </asp:View>
                        <asp:View ID="ControllingView" runat="server">
                        <br />
                        </asp:View>
                    </asp:MultiView>

                </form>
          </div>

<!-- Contentbereich Ende!! -->
        <div id="logo">
        </div>
        
        <div id="menu_u">
        </div>
    </div>
    </div>
    </div>
</body>
</html>
